// JavaScript Document
var cities = new Array(
	new Array("安徽","合肥","芜湖","安庆","马鞍山","巢湖","滁州","黄山","淮南","蚌埠","阜阳","六安"),								
	new Array("澳门","澳门"),																		
	new Array("北京","北京"),																		
	new Array("福建","福州","泉州","厦门","漳州","莆田"),														
	new Array("甘肃","兰州"),																		
	new Array("广东","广州","河源","汕头","深圳","汕尾","湛江","中山","东莞","江门","潮州","佛山","珠海","惠州"),						
	new Array("广西","南宁","北海","桂林","柳州"),															
	new Array("贵州","贵阳","遵义"),																																				
	new Array("海南","海口","三亚"),																																				
	new Array("河北","石家庄","保定","廊坊","秦皇岛","唐山","邯郸","邢台"),																								
	new Array("河南","郑州","开封","洛阳"),																																
	new Array("黑龙江","哈尔滨","大庆","佳木斯","牡丹江","齐齐哈尔"),																										
	new Array("湖北","武汉","十堰","襄樊","宜昌","荆门","荆州","黄石"),																								
	new Array("湖南","长沙","湘潭","株洲","常德","衡阳","益阳","郴州","岳阳"),																		
	new Array("吉林","长春","吉林","辽源","通化"),																																															
	new Array("江苏","南京","常州","昆山","连云港","南通","苏州","张家港","无锡","徐州","扬州","镇江","盐城"),																			
	new Array("江西","南昌","九江","上饶","赣州"),																																
	new Array("辽宁","沈阳","鞍山","大连","葫芦岛","营口","锦州","本溪","抚顺","丹东","铁岭"),																												
	new Array("内蒙","呼和浩特","包头","赤峰"),																																		
	new Array("宁夏","银川"),																																			
	new Array("青海","西宁"),																																				
	new Array("山东","济南","德州","东营","济宁","临沂","青岛","日照","泰安","威海","潍坊","烟台","淄博","菏泽","枣庄","聊城","莱芜"),																						
	new Array("山西","太原","临汾","运城"),																																	
	new Array("陕西","西安","宝鸡","咸阳"),																																		
	new Array("上海","上海"),																																				
	new Array("四川","成都","乐山","泸州","绵阳","内江","宜宾","自贡"),																														
	new Array("台湾","台湾"),																																			
	new Array("天津","天津"),																																				
	new Array("西藏","拉萨","日喀则"),																																			
	new Array("香港","香港"),																																				
	new Array("新疆","乌鲁木齐","喀什","克拉玛依","伊犁","吐鲁番")	
	);
var oProvince, oCity;

//绑定load事件
if (window.addEventListener) {//for IE
	window.addEventListener('load', initProvinceAndCity, false);
} else {//for Firefox
	window.attachEvent('onload', initProvinceAndCity);
}
	
function initProvinceAndCity() {
	oProvince = document.getElementById('province');
	oCity = document.getElementById('city');
	oProvince.onchange = chgProvince; 
	oProvince.options[0]=new Option("不限","");
	oCity.options[0]=new Option("不限","");
	for(i = 0; i < cities.length; i++) {
		oProvince.options[i+1] = new Option(cities[i][0], cities[i][0]);
	}
	oProvince.length = cities.length + 1;
	oCity.length = 1;
	oProvince.options[0].selected = true;
	oCity.options[0].selected = true;
}

function chgProvince() {
	cityIndex = parseInt(this.selectedIndex - 1);
	oCity.options[0]=new Option("不限","");
	if(cityIndex == -1) {
		oCity.options[0].selected = true;
		oCity.length = 1;
	}
	for(i = 1; i < cities[cityIndex].length; i++)
	{
		oCity.options[i]=new Option(cities[cityIndex][i], cities[cityIndex][i]);
	}
	oCity.options[0].selected = true;
	oCity.length=i;
}